
## Created by Anjuta

CC = gcc
CFLAGS = -g -Wall
OBJECTS = datacollection.o\
datacollectionwrap.o\
functions.o

INCFLAGS = -I/usr/include/python2.6

LDFLAGS =
LIBS = -lsqlite3

all: _DataCollection.so

datacollection_wrap.c: datacollection.i
	swig -python datacollection.i
	
datacollectionwrap.o: datacollection_wrap.c
	$(CC) -c -o datacollectionwrap.o datacollection_wrap.c $(INCFLAGS)

functions.o: functions.c
	$(CC) -c -o functions.o functions.c $(INCFLAGS)

datacollection.o: datacollection.c
	$(CC) -c -o datacollection.o datacollection.c $(INCFLAGS)
	
_DataCollection.so: $(OBJECTS)
	ld -o _DataCollection.so $(OBJECTS) $(LDFLAGS) $(LIBS) -shared

.SUFFIXES:
.SUFFIXES:	.c .cc .C .cpp .o

.c.o :
	$(CC) -o $@ -c $(CFLAGS) $< $(INCFLAGS)

count:
	wc *.c *.cc *.C *.cpp *.h *.hpp

clean:
	rm -f *.o

.PHONY: all
.PHONY: count
.PHONY: clean
